﻿@model PresentationMVC.Models.StaffDataModel
           
           
@using (Html.BeginForm("Save", "Staff", FormMethod.Post))
{
    @Html.ValidationSummary(true, "Staff creation was unsuccessful. Please correct the errors and try again.")
    <div>
        <table  width="800px">
            <tr>
                <td class="editor-label">
                     @Html.LabelFor(m => m.Staff.Title)
                </td>
                <td class="editor-field">
                    @Html.DropDownListFor(m => m.Staff.Title.ID, new SelectList(Model.AllTitle, "ID", "Name", Model.Staff.Title))
                </td>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.FirstName)
                </td>
                <td class="editor-label">@Html.TextBoxFor(m => m.Staff.FirstName)<br />
                    @Html.ValidationMessageFor(m => m.Staff.FirstName)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.LastName)
                </td>
                <td class="editor-label">@Html.TextBoxFor(m => m.Staff.LastName)<br />
                    @Html.ValidationMessageFor(m => m.Staff.LastName)
                </td>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.Email)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.Email)
                    @Html.ValidationMessageFor(m => m.Staff.Email)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.AddressLine1)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.AddressLine1)<br />
                    @Html.ValidationMessageFor(m => m.Staff.AddressLine1)
                </td>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.AddressLine2)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.AddressLine2)<br />
                    @Html.ValidationMessageFor(m => m.Staff.AddressLine2)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.City)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.City)<br />
                    @Html.ValidationMessageFor(m => m.Staff.City)
                </td>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.County)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.County)<br />
                    @Html.ValidationMessageFor(m => m.Staff.County)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.Postcode)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.Postcode)<br />
                    @Html.ValidationMessageFor(m => m.Staff.Postcode)
                </td>
                <td class="editor-label">
                     @Html.LabelFor(m => m.Staff.Country)
                </td>
                <td class="editor-label">
                    @Html.DropDownListFor(m => m.Staff.Country.ID, new SelectList(Model.AllCountry, "ID", "Name", Model.Staff.Country))
                </td>
            </tr>
             <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Staff.HomePhone)
                </td>
                <td class="editor-label">
                    @Html.TextBoxFor(m => m.Staff.HomePhone)
                </td>
                <td class="editor-label">
                     @Html.LabelFor(m => m.Staff.MobileNo)
                </td>
                <td class="editor-label">
                     @Html.TextBoxFor(m => m.Staff.MobileNo)
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="Save" id="save" />
                </td>
                <td>
                    @Html.ActionLink(" ", "Index", "Staff", new Object() { }, new { @class = "clear-but" })
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
        </table>
        @Html.HiddenFor(m => m.Staff.ID)
        @Html.HiddenFor(m => m.Staff.InitialEmail)
    </div>
}
